#include "../header.h"


int main(int argc, char const *argv[])
{
    
    //1 getpid
    pid_t pid = getpid();
    printf("当前进程pid = %d\n",pid);
    //2. getuid
    printf("当前uid = %d\n",getuid());
    //3.getppid
    //所有的进程都是由它的父进程创建  并且父进程回收
    printf("当前进程的父进程的pid = %d\n",getppid());
    //4.getgid
     printf("当前进程的用户所属组的组gid = %d\n",getgid());
    //5.getpgrp
    printf("进程组pgrp = %d\n",getpgrp());
    //6.getpgid
    printf("pid进程号的进程组 pgid = %d\n",getpgid(getpid()));

    return 0;
}
